package com.example.botany_api.service;

import com.example.botany_api.bean.Curing;
import com.example.botany_api.bean.Information;
import com.example.botany_api.mapper.CuringMapper;
import com.example.botany_api.mapper.InformationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 漫画忧作
 * @Date 2022/11/5 1:42
 * @Version 1.0
 */
@Service
public class InformationService {
    @Autowired
    InformationMapper informationMapper;
    //    管理员植物资讯
//    分页
    public List getInformation(String name, String summary, String type, int current, int size) {
        return informationMapper.getInformation(name, summary, type, current, size);
    }

    //    总数
    public int getInformationTotal(String name, String summary, String type) {
        return informationMapper.getInformationTotal(name, summary, type);
    }

    //    删除植物资讯
    public int dl_Information(int id) {
        return informationMapper.dl_Information(id);
    }


    //    添加植物资讯
    public int add_Information(Information information) {
        return informationMapper.add_Information(information);
    }

    //    修改植物资讯
    public int up_Information(Information information) {

        return informationMapper.up_Information(information);
    }
}
